
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module lolStocker</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>lolStocker</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/cygdrive/c/Users/lenovo/Documents/sideProjects/lol-stocker/lolStocker.py">/cygdrive/c/Users/lenovo/Documents/sideProjects/lol-stocker/lolStocker.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="urllib2.html">urllib2</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="lolStocker.html#LolStocker">LolStocker</a>
</font></dt><dt><font face="helvetica, arial"><a href="lolStocker.html#SearchFor">SearchFor</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="LolStocker">class <strong>LolStocker</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="LolStocker-__init__"><strong>__init__</strong></a>(self, name, region)</dt><dd><tt>Scrapes&nbsp;data&nbsp;from&nbsp;lolking.net<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;Summoner&nbsp;name&nbsp;(case&nbsp;sensitive)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;region:&nbsp;Server&nbsp;name,&nbsp;ie&nbsp;NA<br>
Class&nbsp;Vars:<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>name</strong>:&nbsp;Summoner&nbsp;name<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>html</strong>:&nbsp;Html&nbsp;page&nbsp;response&nbsp;from&nbsp;looking&nbsp;reading&nbsp;self.<strong>url</strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>region</strong>:&nbsp;Server&nbsp;name<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>updateURL</strong>:&nbsp;Boolean&nbsp;to&nbsp;see&nbsp;if&nbsp;we&nbsp;have&nbsp;to&nbsp;reping&nbsp;the&nbsp;website<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>url</strong>:&nbsp;Current&nbsp;url&nbsp;to&nbsp;ping&nbsp;for&nbsp;information<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>DEBUG</strong>:&nbsp;Boolean&nbsp;to&nbsp;see&nbsp;if&nbsp;in&nbsp;debug&nbsp;mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>BASE_URL</strong>:&nbsp;Constant&nbsp;initial&nbsp;part&nbsp;of&nbsp;a&nbsp;lolking&nbsp;search<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>data</strong>:&nbsp;Array&nbsp;of&nbsp;<a href="#SearchFor">SearchFor</a>&nbsp;objects<br>
&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>page</strong>:&nbsp;The&nbsp;current&nbsp;page&nbsp;of&nbsp;a&nbsp;Summoner's&nbsp;profile<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;&nbsp;None</tt></dd></dl>

<dl><dt><a name="LolStocker-createSearch"><strong>createSearch</strong></a>(self, name, regex, page, type)</dt><dd><tt>Helper&nbsp;function&nbsp;to&nbsp;add&nbsp;a&nbsp;search&nbsp;to&nbsp;the&nbsp;data&nbsp;array</tt></dd></dl>

<dl><dt><a name="LolStocker-findData"><strong>findData</strong></a>(self, searchFor)</dt><dd><tt>Sends&nbsp;a&nbsp;request&nbsp;to&nbsp;lolking&nbsp;and&nbsp;fetces&nbsp;data&nbsp;based&nbsp;on&nbsp;a&nbsp;<a href="#SearchFor">SearchFor</a>&nbsp;object<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;searchFor:&nbsp;The&nbsp;search&nbsp;criteria<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;&nbsp;Array&nbsp;of&nbsp;matches&nbsp;based&nbsp;on&nbsp;searchFor's&nbsp;regex</tt></dd></dl>

<dl><dt><a name="LolStocker-updateURL"><strong>updateURL</strong></a>(self, page)</dt><dd><tt>Helper&nbsp;function&nbsp;to&nbsp;update&nbsp;the&nbsp;url&nbsp;based&nbsp;on&nbsp;what&nbsp;page&nbsp;the&nbsp;information&nbsp;is&nbsp;on</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SearchFor">class <strong>SearchFor</strong></a></font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SearchFor-__init__"><strong>__init__</strong></a>(self, name, regex, page, type)</dt><dd><tt>Data&nbsp;class&nbsp;to&nbsp;organize&nbsp;searching&nbsp;for&nbsp;lolking<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;The&nbsp;type&nbsp;of&nbsp;data&nbsp;being&nbsp;displayed,&nbsp;ie&nbsp;ELO<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;regex:&nbsp;the&nbsp;expression&nbsp;to&nbsp;locate&nbsp;this&nbsp;type&nbsp;of&nbsp;data<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page:&nbsp;the&nbsp;page&nbsp;of&nbsp;the&nbsp;lolking&nbsp;file&nbsp;to&nbsp;parse,&nbsp;ie&nbsp;profile/ranked-stats<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;the&nbsp;printing&nbsp;format&nbsp;type&nbsp;(integeger)&nbsp;see&nbsp;getData<br>
Returns:&nbsp;None</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-compMostPalyed"><strong>compMostPalyed</strong></a>(a, b)</dt><dd><tt>Sorts&nbsp;champions&nbsp;based&nbsp;on&nbsp;most&nbsp;played&nbsp;games</tt></dd></dl>
 <dl><dt><a name="-getData"><strong>getData</strong></a>(searchFor, summoner)</dt><dd><tt>Prints&nbsp;data&nbsp;to&nbsp;the&nbsp;console&nbsp;based&nbsp;on&nbsp;the&nbsp;search&nbsp;criteria<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;&nbsp;searchFor:&nbsp;<a href="#SearchFor">SearchFor</a>&nbsp;object<br>
&nbsp;&nbsp;&nbsp;&nbsp;summoner:&nbsp;Summoner&nbsp;object<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;&nbsp;None</tt></dd></dl>
 <dl><dt><a name="-init"><strong>init</strong></a>()</dt><dd><tt>Runs&nbsp;the&nbsp;script</tt></dd></dl>
</td></tr></table>
</body></html>